<script setup lang="ts">
import { computed } from 'vue'
import { lat2str, lng2str } from '@/geom/great-circle'
import type { Airport } from './types'

const props = defineProps<{
  type: string
  item: Airport
}>()

const lng = computed(() => lng2str(props.item.location.lng))
const lat = computed(() => lat2str(props.item.location.lat))
</script>
<template>
  <div class="entity-info pane-block">
    <div class="row">
      <div class="col-4em">机场:</div>
      <div class="col">
        {{ item.id }}
      </div>
    </div>
    <div class="row">
      <div class="col-4em">经度:</div>
      <div class="col">
        {{ lng }}
      </div>
    </div>
    <div class="row">
      <div class="col-4em">纬度:</div>
      <div class="col">
        {{ lat }}
      </div>
    </div>
  </div>
</template>
